package sprites;

/**
 * Type of sprite that is not controlled by user and is harmful to the user.
 * @author Amay
 *
 */
public class EnemySprite extends NonResponsiveSprite {

    /**
     * Constructor that calls super class.
     */
    public EnemySprite () {
        super();
    }

    /**
     * Constructor that sets sprite image from String image location.
     * @param imgLoc String location of sprite image.
     */
    public EnemySprite (String imgLoc) {
        super(imgLoc);
    }

    /**
     * Constructor that creates a new Sprite of the same parameters as the passed-in Sprite.
     * @param enemy EnemySprite to be copied
     */
    public EnemySprite (EnemySprite enemy) {
        super(enemy);
    }

    @Override
    public void collisionHandle (Sprite s) {
        if (isCollidableWith(s)) {
            int changeInHP = -1;
            configureHP(getHP() + changeInHP);
        }
    }
}
